import Cookies from 'js-cookie'
// cookie保存的天数
import config from '../config'

export const TOKEN_KEY = 'Admin-Token'

export const setToken = (token) => {
  localStorage.setItem(TOKEN_KEY, token)
}

export const getToken = () => {
  const token   = localStorage.getItem(TOKEN_KEY)
  if (token) return token
  else return false
}
